package org.gczl.core.until;

import net.sf.json.JSONObject;

/**
 * @author ljh
 * 获取accesstoken
 */
public class getAccessToken {

	public static final String appid="wxc27a20949311ca46";
	
	public static final String appSecret="a24c4b4ac725985c272ea3fbe3e6b2a7";
	
	public static final String grant_type = "client_credential";
	
	public static JSONObject getToken(){
		
		String url = "https://api.weixin.qq.com/cgi-bin/token?"
				+ "appid="+appid+"&"
				+ "secret="+appSecret+"&"
				+ "grant_type="+grant_type+"";
		
		
		String result = HttpUtil.doGet(url);
		
		JSONObject jsonObject = JSONObject.fromObject(result);
		
		return jsonObject;
		
	}
}
